package com.example.myskyjava.controller;


import com.example.myskyjava.ThrowData.Result;
import com.example.myskyjava.domain.SkyData;
import com.example.myskyjava.service.SkyService;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/admin")
public class skyCtrl {
    @Resource
    private SkyService SkyService;



    @RequestMapping("/skyAdd")
    public Result add(@RequestBody SkyData skyData){
       return SkyService.add(skyData);
    }

    @RequestMapping("/skySelect")
    public Result select(@RequestBody SkyData skyData){
        return SkyService.select(skyData);
    }

    @RequestMapping("/skyDelete")
    public Result delete(@RequestBody SkyData skyData){
        return SkyService.deletMsg(skyData);
    }

    @RequestMapping("/skyUpdate")
    public Result update(@RequestBody SkyData skyData){
        return SkyService.updateMsg(skyData);
    }

}
